package categories;

import static org.junit.Assert.*;

import org.junit.Test;
import org.junit.experimental.categories.Categories;
import org.junit.experimental.categories.Categories.IncludeCategory;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;

public class CategoriesExample {

public interface FastTests {
}
       
public interface SlowTests {
}

public static class A {
       @Test
       public void a() {
               fail();
       }

       @Category(SlowTests.class)
       @Test
       public void b() {
       }
}

@Category( { SlowTests.class, FastTests.class })
public static class B {
       @Test
       public void c() {

       }
}

@RunWith(Categories.class)
@IncludeCategory(SlowTests.class)
@SuiteClasses( { A.class, B.class })
// Note that Categories is a kind of Suite
public static class SlowTestSuite {
}


}
